package com.example.alibabanacosdiscoveryclient01.service;

import org.springframework.ai.chat.model.ToolContext;
import org.springframework.ai.tool.annotation.Tool;
import org.springframework.ai.tool.annotation.ToolParam;
import org.springframework.stereotype.Service;

/**
 * @author:guoq
 * @date:2025/5/13
 * @descripion:
 */
@Service
public class ClimateService {
    @Tool(description = "根据城市名称获取天气预报信息")
    public String getWeather(@ToolParam(description = "城市") String cityName, ToolContext toolContex) {
        return cityName + "阳光明媚,清空万里";
    }

    @Tool(description = "根据城市名称获取空气质量")
    public String getAirQuality(@ToolParam(description = "城市") String cityName,ToolContext toolContex) {
        return cityName + "空气质量很好 by: lcry～";
    }
}
